<div>
    <ul class="layui-nav" lay-filter="">
        <li class="layui-nav-item"><a href="/">首页</a></li>
        <li class="layui-nav-item"><a href="/vip/vip.html">VIP购买</a></li>
        <li class="layui-nav-item"><a href="" target="_blank">领取100积分</a></li>
        <li th:if="${session.currentUser!=null}" class="layui-nav-item" style="float: right;">
            <a href="/center">
                <img class="layui-nav-img" th:if="${session.currentUser.avatar != ''}" th:src="${'/avatars/' + session.currentUser.avatar}" th:text="${session.currentUser.username}"/>
                <img class="layui-nav-img" th:if="${session.currentUser.avatar == ''}" src="/images/avatar-default.jpg" th:text="${session.currentUser.username}"/>
            </a>
            <dl class="layui-nav-child">
                <dd><a onclick="showModifyPassword()">修改密码</a></dd>
                <dd><a onclick="showModifyUserAvatar()">修改头像</a></dd>
                <dd><a href="/logout">安全退出</a></dd>
            </dl>
        </li>
        <li th:if="${session.currentUser!=null}" class="layui-nav-item" style="float: right;">
            <a href="/center">个人中心<span class="layui-badge-dot"></span></a>
        </li>
        <li th:if="${session.currentUser!=null and session.currentUser.messageCount!=0}" class="layui-nav-item" style="float: right;">
            <a href="/message/see">系统消息<span class="layui-badge" id="messageCount" th:text="${session.currentUser.messageCount}">0</span></a>
        </li>
        <li th:if="${session.currentUser==null}" class="layui-nav-item" style="float: right;">
            <a onclick="showRegister()" style="padding-left: 8px;padding-right: 8px;" target="_blank">注册</a>
        </li>
        <li th:if="${session.currentUser==null}" class="layui-nav-item" style="float: right;">
            <a onclick="showLogin()" style="padding-left: 8px;padding-right: 8px;" target="_blank">登录</a>
        </li>
    </ul>
</div>